/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.manager;

import br.com.foxline.model.Quality;
import br.com.foxline.service.QualityService;
import br.com.foxline.util.Msg;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author roniere
 */
@ManagedBean
@ViewScoped
public class ManagerQuality implements Serializable{
    @EJB
    QualityService qualityService;
    
    private Quality quality;

    @PostConstruct
    public void init(){
        quality = new Quality();
    }
    public Quality getQuality() {
        return quality;
    }

    public void setQuality(Quality quality) {
        this.quality = quality;
    }
    
    public void create(){
        qualityService.save(quality);
        quality = new Quality();
        Msg.messagemInfo("Salvo com Sucesso !");
    }
}
